package com.gitee.chili.leisure.util;

import org.reflections.Reflections;

import java.util.Set;

/**
 * ClassUtil
 *
 * @author week solider
 * @since 2020.08.28
 */
public class ClassUtil {


    /**
     * 获取目标类下的所有子类限定名
     */
    public static <T> Set<Class<? extends T>> getSubclasses(Class<T> clazz) {
        Reflections reflections = new Reflections(clazz);
        return reflections.getSubTypesOf(clazz);
    }

}
